package chapter23.homework02;

public class Pro extends State{
    public Pro(State sec){
        this.rankName= "高手";
        this.player = sec.player;
        this.point = sec.point;
    }

    @Override
    public void checkState(int point) {
        if(point < 50){
            player.setState(new Secondary(this));
        }else if(point > 100){
            player.setState(new Final(this));
        }
    }

    @Override
    public void doubleScore() {
        System.out.println(rankName + "玩家" + player.getName() + "使用积分翻倍+30");
        point += 30;
        checkState(point);
    }

    @Override
    public void changeCards() {
        System.out.println(rankName + "玩家" + player.getName() + "换牌");
    }
}
